import request from '@/utils/request'
import scope from './scope'
const apiPrefix = `${process.env.VUE_APP_BASE_API}/${scope}/machinecheck/`

// 项目管理
export const getMachineCheck = (params, config = {}) => {
  return request.get(apiPrefix + 'get', { params: params }, config)
}
export const getMachineCheckListPage = (params, config = {}) => {
  params = params || {}
  return request.post(apiPrefix + 'getpage', params, config)
}
export const getOwnerMachineCheckListPage = (params, config = {}) => {
  params = params || {}
  return request.post(apiPrefix + 'getownerpage', params, config)
}
export const addMachineCheck = (params, config = {}) => {
  return request.post(apiPrefix + 'add', params, config)
}
export const editMachineCheck = (params, config = {}) => {
  return request.put(apiPrefix + 'update', params, config)
}
export const removeMachineCheck = (params, config = {}) => {
  return request.delete(apiPrefix + 'softdelete', { params: params }, config)
}
export const getCheckReportCommit = (params, config = {}) => {
  return request.get(apiPrefix + 'getcommit', { params: params }, config)
}
export const commitCheckReport = (params, config = {}) => {
  return request.put(apiPrefix + 'updatecommit', params, config)
}
export const getCheckHisPage = (params, config = {}) => {
  params = params || {}
  return request.post(apiPrefix + 'getcheckhispage', params, config)
}
